package cn.ljy.mes.web.controller.backstage.mes.material;


import cn.ljy.authority.web.controller.backstage.BaseBackstageController;
import cn.ljy.mes.model.MesMaterialType;
import cn.ljy.mes.model.query.MesMaterialTypeQuery;
import cn.ljy.mes.service.MesMaterialTypeService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "后台物料类别模块")
@RestController
@RequestMapping(value = "/backstage/mes/materialType")
public class MesMaterialTypeController extends BaseBackstageController<MesMaterialType, MesMaterialTypeQuery,Long> {

    @Autowired
    private MesMaterialTypeService baseService;

    @Override
    public String getAuthorityPrefix() {
        return "mes:materialType"; // 定义模块权限前缀
    }

//    @ApiOperation(value = "查询物料类别列表")
//    @PreAuthorize("hasAuthority('mes:materialType:query')")
//    @GetMapping("/all")
//    @Override
//    protected ResponseData query(MesMaterialTypeQuery query) {
//        return super.query(query);
//    }

//    @ApiOperation(value = "分页查询物料类别列表")
//    @PreAuthorize("hasAuthority('mes:materialType:query')")
//    @Override
//    public ResponseData query(Integer page, Integer pageSize, MesMaterialTypeQuery mesMaterialTypeQuery){
//        return super.query(page,pageSize,mesMaterialTypeQuery);
//    }

//    @ApiOperation(value = "添加物料类别")
//    @PreAuthorize("hasAuthority('mes:materialType:add')")
//    @Override
//    protected ResponseData add(@Validated({AddWorkValidation.class}) @RequestBody MesMaterialType mesMaterialType) {
//        return super.add(mesMaterialType);
//    }
//
//    @ApiOperation(value = "读取物料类别指定信息")
//    @PreAuthorize("hasAuthority('mes:materialType:query')")
//    @Override
//    protected ResponseData get(@PathVariable Long id) {
//        return super.get(id);
//    }
//
//
//    @ApiOperation(value = "编辑物料类别")
//    @PreAuthorize("hasAuthority('mes:materialType:edit')")
//    @Override
//    public ResponseData edit(@Validated({UpdateWorkValidation.class}) @RequestBody MesMaterialType mesMaterialType){
//        return super.edit(mesMaterialType);
//    }
//
//    @ApiOperation(value = "批量删除指定的多个物料类别")
//    @PreAuthorize("hasAuthority('mes:materialType:del')")
//    @Override
//    public ResponseData deletes(Long[] ids){
//        return super.deletes(ids);
//    }

}
